import request from '@/utils/request'

// 查询用户分页数据
export const GetSysUserPage = (pageNum, pageSize, searchObj) => {
  return request({
    url: `/admin/system/user/page/${pageNum}/${pageSize}`,
    method: 'get',
    params: searchObj,
  })
}
//根据id删除用户
export const DeleteUserById = id => {
  return request({
    url: `/admin/system/user/deleteById/${id}`,
    method: 'DELETE',
  })
}
//根据id查询用户
export const GetUserById = id => {
  return request({
    url: `/admin/system/user/getById/${id}`,
    method: 'GET',
  })
}
//更新用户
export const UpdateUserById = user => {
  return request({
    url: `/admin/system/user/updateById`,
    method: 'PUT',
    data: user,
  })
}
//新增用户
export const SaveUser = user => {
  return request({
    url: `/admin/system/user/save`,
    method: 'POST',
    data: user,
  })
}
